Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 5, 2026

Summary

  • Fix panic when untagged alternation contains a tagged alternation as a branch (e.g., [[A: (x)]])

Why

The compiler at sequences.rs:227 assumed that if the type is an Enum, all branches must have labels. But a nested untagged alternation like [[A: (x)]] can inherit an enum type from its inner branch while the outer branches have no labels.

The fix checks if branches are syntactically tagged (have labels in AST), not just whether the resulting type is an enum.

@zharinov zharinov merged commit f07603f into master Jan 5, 2026
4 checks passed
@zharinov zharinov deleted the fix/nested-untagged-alt branch January 5, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants